<?php
class DefaultViewHistoryAction extends FrontendAction
{
	public function __construct()
	{
		parent::__construct();
		$this->responseType = 'none';
	}
	
	public function execute()
	{
		$id = $this->context->get('id');
		if(!is_numeric($id))
		{
			$id			= base64_decode($id);
			$tmp		= explode('_',$id);
			$id			= $tmp[0];
		}

		if(!$this->data['isRobot'] && is_numeric($id))
		{
			C('ViewHistoryService')->updateViewHistory($id,1,1);
		}
	}
}
